package com.pubinfo.passbook.data.quartz.task;

import com.pubinfo.passbook.common.model.constant.RedisKey;
import com.pubinfo.passbook.common.service.cache.JedisManage;
import lombok.extern.slf4j.Slf4j;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

@Configuration
@Slf4j
@DisallowConcurrentExecution
public class ClearUserNOIDJob implements Job {

    @Resource
    private JedisManage jedisManage;

    @Override
    public void execute(JobExecutionContext jobExecutionContext) {
        jedisManage.deleteByStrKey(RedisKey.USER_NO_ID);
    }
}
